package com.example.exceldemo.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import lombok.Data;

@Data
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@HeadStyle(horizontalAlignment =HorizontalAlignmentEnum.CENTER)
public class BookExcel {

    @ExcelProperty("书名")
    @ColumnWidth(20)
    private String name;
    @ExcelProperty("价格")
    @ColumnWidth(20)
    private Integer price;
    @ColumnWidth(15)
    @ExcelProperty("类型")
    private String type;

}
